Comments should be sent to AppleLink address OPENTPT or Internet address 'opentpt@applelink.apple.com' Unfortunately, we can not provide general technical support via this AppleLink address.
Overview
This is a development release of Open Transport for AppleTalk and TCP/IP.
This release includes an AppleTalk Phase 2 stack containing PAP, ADSP, ATP, DDP and below. It includes a TCP/IP stack containing TCP, UDP, IP and a DNR. More information on the particular capabilities of these two stacks are contained in documentation specific to AppleTalk or TCP/IP (see below).
What this release contains
This release includes
• an Installer that will install Open Transport 1.0b1 and Apple Shared Library Manager 2.0b13 onto your machine.
• a Developer Files folder that contains:
• An ASLM Developer folder contain tools for developing ASLM shared libraries, as well as debugging versions of the Shared Library Manager itself.
• An Open Tpt Client Developer folder that contains documents, header files, MPW libraries, and sample programs
Known bugs/incompatibilities
• The AppleTalk setting "Load only when needed" currently acts the same as "Load always". This will be fixed in the next release.
•Users may want SLIP and/or PPP connections to happen automatically when an endpoint is opened (that is, from the user's point of view, when the networking application is executed). Currently, only MacPPP permits this. The other supported SLIP and PPP 3rd-party products, InterSLIP and InterPPP, do not; their server connections must be started up using the 3rd-party-supplied CDEV before opening an endpoint. Failure to establish the InterSLIP/InterPPP connection first will cause opening an endpoint to fail. MacPPP, however, may be used in either automatic or manual/CDEV connection mode.
• Attempting to run the AppleTalk Internet Router with Open Transport will cause a crash. While Open Transport will not work with the AppleTalk Internet Router, the Open Transport team is attempting to keep it from crashing, if possible.
• Multi-node delivery for AppleTalk is still not working for backward-compatibility. However, a multi-node Open Transport endpoint does work correctly.
• "Fixed-node" feature of AppleTalk is temporarily disabled. It will be back in the next release.
Changes coming in the next release
• An object library will be added to the PowerPC build if you want to be an ASLM client and an OT client at the same time for stand-alone code fragments. Applications won't need this library.
API changes since 1.0a3
•New functions OTRegisterAsClient and OTUnregisterAsClient have been added. They are currently only stub routines that return the kOTNotSupportedErr. They will be supported and documented in the next release.
• The definition of OTPortRecord has been modified to have fInfoFlags and fPortFlags. The fInfoFlags are the original values of the fFlags field. The fPortFlags have status information about the port.
• The T_PROVIDERWILLCLOSE event was renamed to kOTProviderWillClose.
• More bits in the gestalt selector have been defined (see OpenTransport.h for details)
• OTEnterInterrupt and OTLeaveInterrupt now take no parameters.
• New functions EnterOTContext and LeaveOTContext have been added. These are used by non-application code segments when entering and leaving your code. They are also used in conjunction with OTEnterInterrupt and OTLeaveInterrupt in interrupt code.
• InitOpenTransport no longer takes a boolean parameter. Open Transport determines if the caller is an application by comparing the A5 global world to the CurrentA5 low-memory global.
• OTDestroyDeferredTask and OTDestroySystemTask now return an OSStatus value. Currently, OTDestroySystemTask always returns kOTNoError. OTDestroyDeferredTask may return kEAGAINErr if you are trying to destroy the deferred task while it is scheduled (this can only happen of you destroy the deferred task from within an interrupt service routine or another deferred task, which is rare).
• The common IOCTL equates were renamed from kxxxxxxx to I_xxxxxxx to be consistent with the standard IOCTL naming conventions.
Changes since 1.0a3
General
• The RcvUData call previously returned a kOTBufferOverflowErr if the client did not supply an address or option buffer. In this case, no data from the packet was returned (per the XTI specification). Using a more liberal interpretation of the specification, this will only occur if you actually supply a buffer with a maxlen value not equal to zero, but not big enough. Using a zero maxlen value will not return a buffer overflow error.
• All DebugStrs in the Open Transport infrastructure are now removed in the non-debug version.
• The OTEnterInterrupt function no longer changes the A5 world.
• Serial and LocalTalk ports are now "rescanned" after sleep, so that if docking or undocking occured, the available ports are updated.
• The Open Transport libraries for PowerPC are now PEF containers. This requires the PPCLink tool version 1.2 or higher. NEVER try to use the OpenTransportLib library itself to link with. Use the separate PEF libraries OpenTransportLib or OpenTransportUtilLib, and only use one of them. Most applications will need OpenTransportLib. OpenTransportUtilLib is for applications that are only dealing with ports and never create a provider (it does not cause the whole STREAMS environment to load into memory).
• OTAckSends was return kOTNoError even if an error occurred.
• If OTScheduleDeferredTask was called, and we were at System Task or DeferredTask time already, the callback function was called without setting the correct global world or ASLM client. This caused random crashes and hangs.
• Open Transport no longer loads resident code "just in case" you want to use AppleTalk or TCP/IP. This code is made resident the first time Open Transport is actually used. In general, the whole startup process of Open Transport was changed to make it more robust.
• A T_PASSCON event will be sent to an endpoint that is the recipient of an incoming connection. If it is the same endpoint as the endpoint that issued the Accept() call, the T_PASSCON event will be received AFTER the T_ACCEPTCOMPLETE event.
• When the machine goes to sleep or is being shutdown, Open Transport will close all outstanding endpoints. It will give you a kOTProviderWillClose notification before doing so.
• New libraries were supplied for clients of Open Transport that are also clients of ASLM. This is so that Open Transport clients that don't use ASLM themselves can link with Open Transport libraries, without linking with ASLM libraries. In order to do this, several ASLM routines are "stubbed out" in the Open Transport libraries. In order to get the "real" routines, you can either link with ASLM libraries first (and get all the duplicate symbol warnings), or link with the appropriate Open Transport libraries that have the extra word "ASLM" in them (see the Client ReadMe for details).
• OTMemmove and OTMemcpy no longer have return values.
• If SndUReply completed immediately, the client got a NULL for the cookie in the T_REPLYCOMPLETE event. This is now fixed.
• CFM drivers are now correctly "Held" in memory. This bug caused a problem when VM was on.
• The Open Transport module libraries are now correctly "Held" in memory. This bug caused a problem when VM was on.
• The Ioctl constans in OpenTransport.h were renamed to start with I_ instead of "k" to be consistent with other Ioctl constants.
• OTPortRecords were completely reworked.
• Power Management support was added when the network is busy to keep the machine from going to sleep or dropping to low power.
• OTCloneConfiguration now works correctly. In some prior version, it returned the original pointer.
• The equate kInvalidPortRef was changed to kOTInvalidPortRef.
• Event handling was modified heavily. Events used to be delivered on the same thread as the causal factor. This is no longer true. Practically speaking, what this means is that code that used to read only 1 packet per T_DATA, T_REQUEST, or T_REPLY event may no longer work because it is now possible for there to be more than 1 packet waiting when the event is received.
• A declaration was added in OpenTptXTI.h for the t_errno variable.
• It is no longer a requirement to call OTScheduleDeferredTask to call Open Transport from within deferred tasks. You can call Open Transport directly from a deferred task invoked using _DTInstall.
• A call to OTAsyncOpenEndpoint that used in-line options (i.e. "OTCreateConfiguration("ddp(Checksum=1)") no longer hangs.
• Fixed a problem where if an event was delivered to a client notifier, and another event occurred while still inside the client notifer, the second event was lost. This most commonly occurred with T_ORDREL events getting lost.
Backward-compatibility for AppleTalk
• Fixed a problem where the source address of a multi-node packet was not set up properly.
• Fixed a bug in the Chooser where HSetState was called on a garbage handle value.
• Fixed a problem when closing a socket. Under Open Transport, an endpoint can't be unbound if there are still pending packets (which is what we do when we close a socket). This is now handled correctly.
• SPConfig and PortBUse handling was fixed.
• Fixed a problem where .MPP was improperly dealing with the list of registered names when closing the driver. This could cause a crash when changing links.
• MultiNode support is now working correctly.
• Open Transport and MacSNMP can now co-exist without crashing each other.
• Zone-changing now works correctly
• Added a "hack" to the openSkt call so that any PB that requests a socket >= 128 is assumed to be requesting a dynamic socket. Many clients are issuing asynchronous openSkt calls, but reusing the parameter block before the call is completed. Under "classic" AppleTalk, openSkt was inherently synchronous and this did not cause problems. Under OT, openSkt really goes asynchronous, so this hack helps alleviate the problem in most cases.
• Don't respond to lookups that are from ourselves.
• Improve support for LocalTalk ADEVs
• Fixed a Chooser problem for GX printers.
• Fixed many problems with loading ADEVs
Backward-compatibility for TCP/IP
• Return a long error code from DNR calls, even though the documentation say it's an OSErr. Mosaic does a Tst.l D0, which causes problems if we don't do this.
• UDP applications now work.
• Fixed a problem where the old IP address was being remembered despite reconfiguration of the IP address.
• Place the local port and IP address in user's PBlock at bind completion. This fixes a Mosaic and Anarchie hang.
TCP/IP
• The DNR no longer binds automatically to port 53. Instead, port 0 is used so that the system will choose a port number for it. This gives a higher port number, which makes things work better with certain firewalls and external DNS servers.
• When using the Advance Mode in the control panel, configured DNS servers are given preference over MacIP returned servers.
• Added a default gateway address and a Domain Name Server's address to the data structure returned by GetInterfaceInfo
AppleTalk
• Fixed a hang problem if AppleTalk could not acquire a node address because they were all in use. Also, limited the number of address that are tried.
• Fixed acquiring a multi-node address.
• Fixed a problem where NBP was not matching "*" as a zone name if we were on a network with a router.
• Fixed a problem where multiple simultaneous NBP lookups were getting confused as to who was supposed to receive the results of a lookup.
• Fixed several problems where ZIP or NBP functions would cause a hang or crash if they failed.
• Binding to a socket of 255 now returns an error.
• DDP no longer accepts DDPNBP addresses for any call but Bind.
• PAP now talks to printers properly.
• Multinode support is now working correctly.
• Fixed up address acquisition so that if an address could not be acquired, an error is returned. Also limited the number of attempts at address acquisition.
• AARP was modified to limit the number of entries that are cached to keep us from growing the cache without bounds.
• Fixed an addressing problem in PAP that was causing the server to ingore incoming requests after accepting a connection.
• NBP no longer tries to match a name that has an "=" in it that is not a stand-alone character.
Links
• The Link drivers now allow multiple endpoints to bind to the same address.
• The Link drivers now have an option that allows an endpoint to receive all 802 packets, independent of DSAP. See the Ethernet Developer Note.
• On a machine with a single serial port, LocalTalk is now registered as 'ltlkAB' (it is also registered as the default LocalTalk port 'ltlk'.
• Serial endpoints are working again. All of the serial options are now 4-byte options (matching the comments in the header file), rather than 1-byte options.
• The OTPortRecord structure was changed significantly.
• The device-type equates in OpenTptLinks.h were modified.
• Added support for getting the Physical Address from ethernet drivers.
• A new device equate was added for 100 MB Ethernet
• Support for Ethernet "Raw Mode" was added via an IOCTL call
Not in this release
AppleTalk Session Protocol (ASP) is not provided and is not planned for the first release of Open Transport. Use AppleTalk backward compatibility.
Other notes about this build.
ASLM 2.0b13
This build installs ASLM 2.0b13. If you currently have a debugging version of ASLM installed, installing the non-debug version of Open Transport will replace your debug version of ASLM with the non-debug version..
Macsbug messages
If you install the debug version of OpenTransport, there are many internal debugger breaks. You must have macsbug installed, or else if a debugger break occurs, you'll get the "bomb" box.
The Installer installs various Macsbug templates and DCMD's into your Debugger Prefs file. If you have Macsbug on the target machine, an Easy Install will automatically update the Debugger Prefs file. If you're using a newer Macsbug (6.5) which doesn't come with a Debugger Prefs file, the Installer will create a Debugger Prefs file.
There is mostly a pattern to the debugger messages that appear. Most messages have a leading digit, either '0', '1', or '2'. The meanings are:
0 Fatal error. Dump all the registers and do a stack crawl and include the results in a bug report along with what you were doing at the time. Don't bother trying to continue on in Macsbug. The machine is hosed.
1 General error. These debugger breaks occur for events that should not have happened, but this does not necessarily mean that there is a bug in Open Transport. Sometimes these debugger breaks occur because a client has supplied bogus parameters. Hitting 'g' in macsbug should cause the machine to continue on.
2 Status only. Just hit 'g' in Macsbug. These messages report unusual events.
Documentation
There is a "Document" folder which contains more documentation:
• Open Transport Client Note - A reference document for programmers wishing to write software using the Open Transport APIs.
• Open Tpt AppleTalk Dev Note - Material specific to AppleTalk.
• Open Tpt Serial Dev Note - Material specific to Serial endpoints.
• Open Tpt TCP/IP Dev Note - Material specific to TCP/IP.
All of these are preliminary. All of these will be worked over and turned into Apple DocViewer format documents for the final release of Open Transport.
The installer
The installer will Easy Install the Apple Shared Library Manager and Open Transport AppleTalk and TCP/IP version 1.0a4, as well as AppleTalk and MacTCP compatibility..
You can “undo” the AppleTalk compatibility installation by using the Network Software Installer 1.4.2 or later, and custom installing AppleTalk for System 7, Ignore any warnings it might give you about installing over a ‘newer’ AppleTalk.
This release also includes a version of MacTCP 3.0. To remove it, remove the TCP/IP Control Panel and reinstall the MacTCP control panel.
Debugger support
The installer will install Open Transport Debugger preferences into the DebuggerPrefs file in your System Folder, if you have one. These debugger prefs contain the ASLM debugger prefs plus Macsbug templates for virtually all structures used in the API. A Macbug dcmd is installed also that can display strings for error messages. For example, typing “OTErr -3158” will tell you what error number -3158 is.
Sample Code
There is a "Samples" folder which contains sample programs and source files.
All of the samples have makefiles that can be used to build them. All of the makefiles use shell variables that must be set to the full pathname of the folders containing the Apple Shared Library Manager and Open Transport header files and object libraries. If you drag the header files and object files from the developer tools diskette to the normal places in MPW, you’d want to set up the shell variables like this before building.
Set ASLMIncludes “{CIncludes}”
Set OldLibraries "{MPW}Libraries:OldLibraries"
Set OTIncludes “{CIncludes}”
Set OTLibs “{CLibraries}”
Set ASLMLibs “{CLibraries}”
Export ASLMIncludes OTIncludes OTLibs ASLMLibs
After doing this,you can build the sample programs by setting your current MPW directory to be the one containing the samples and using the ‘make’ tool. For example, to build the AppleTalk DDPSample program, run the make tool and execute the output:
Make -f DDPSample.make
OpenTransport header files require the header files that were released on E.T.O. #16 in the "Prerelease MPW" folder.
Earlier Release Notes
API changes since 1.0a2
•According to the STREAMS manual, a Close that is done in blocking mode (OTSetBlocking function) will allow the STREAM queues to drain (by delaying up to 15 seconds per module). Open Transport now honors the blocking mode on a Close.
• Open Transport Client APIs are not callable at primary interrupt time. Use the OTCreateDeferredTask and OTScheduleDeferredTask functions to schedule calling OT functions at deferred task time. Open Transport notifications are NEVER called at primary interrupt time, so you can call all of the Open Transport APIs you want from inside your notification routine (of course, you still can't make synchronous calls from within the notification routines).
• The OTSetBlocking and OTSetNonBlocking APIs no longer return an error as long as the ProviderRef is a legal value. This is to facilitate being able to set a provider into non-blocking mode and closing it at any time.
• The MI_BIG_ENDIAN definition was removed from OpenTranposrt.h
• Added the OTCountDataBytes API for "peeking" at the number of data bytes available to the provider.
• The T_SENDCOMPLETE event was renamed to T_MEMORYRELEASED to reflect the new AckSend() semantics.
• The Look() function is now fast. It only checks local state instead of peeking into the kernel.
• The T_DATA and T_EXDATA return values from Look() are now accurate indications as to whether more data is present or not.
Changes since 1.0a2
General
• The libraries Open Tpt Serial Library and Open Tpt Ethernet Library have now been merged into the Open Transport Library file. On PowerPC, a new file called "OpenTransportLib" has been added containing CFM libraries for Open Transport.
• Removed several annoying DebugStrs.
• Several problems related to orderly releases were fixed
• Snd now returns the correct error code on async non-blocking calls.
• (Modules) Added OTReallocMem function.
• (Modules) Fixed the inline atomic functions that return a boolean so that they return 0 and 1 instead of 0 and -1.
• (Modules) Added bitmap, random and hash list functions
• Dropped TOTMethodNotifiers from the API. Removed the definition of TOTNotifiers from the public header files.
• Fixed the OTNextLookupBuffer macro so that it works properly.
• Many interrupts on/off sequences were removed to improve performance on PowerPC.
• (Modules) Open and Close functions should now be called only at System Task time. (Remember that after you return from Close, your module is gone - so don't do anything that's going to call you back!)
• The way that AckSends work has been changed. AckSends now ALWAYS requires a notifier, and will not wait on synchronous calls until the data is acknowledged.. This makes AckSends much more useful on synchronous endpoints. The T_SENDCOMPLETE event was renamed to T_MEMORYRELEASED.
• There are now two installers for Open Transport, a debug install and a non-debug install.
• May performance improvements for PowerPC
Backward-compatibility for AppleTalk
• A router supplying "bad" RTMP packets will no longer cause the client to get annoying notifications every 10 seconds.
• NBP Confirms are now really confirms on the wire instead of lookups
• Added support for the ATClosePrep AppleTalk transition event.
• Fixed numerous problems where things went wrong if AppleTalk couldn't open.
• Install a new version of the Chooser that is more robust with the new memory manager.
• The AppleTalk On/Off buttons are back in the Chooser ( but don't use them )
Backward-compatibility for TCP/IP
• The backward-compatibility infrastructure was reworked to reduce race conditions. UDP does not work well, and TCP has occasionally problems on some applications. This will be fixed in the next release.
TCP/IP
AppleTalk
• The "Fixed Node" option of AppleTalk is now working
• LocalTalk now works on PowerPC machines. The Open Transport Installer installs new versions of LocalTalk for them.
• DDP now supports the Boolean option "OPT_SELFSEND". This allows clients to turn self-send of broadcast packets on and off on an endpoint-by-endpoint basis.
• (1189280) Fixed a problem where a 0-length zone name was interpreted as 1 byte long in the NBP name functions
• Fixed the echo stub so that it properly answers echo requests. This also fixes a problem where the Chooser takes a long time to connect to a file server.
• OTInitDDPNBPAddress erroneously had a DDPAddress* as the first parameter.
• Fixed a problem where ADSP did not accept a handed-off connection properly.
• (1174287) Don't glean address information from packets with a hopcount > 0.
• Changed the way wait time is computed for Connects in PAP, so that it corresponds to "Inside AppleTalk"
Links
• Fixed a problem where AppleTalk was delivered IPX Ethernet packets.
• Fixed a problem where Open Transport assumed that completion routines from .ENET drivers were called at interrupt time, which is quite often not true, causing performance degradation.
• Fixed a problem in the serial endpoint where the Connect failed because we used a bogus name for the .AOUT driver. Also fixed the connect failed logic so that it works properly.
• FDDI now properly uses the ENET multicast address space instead of the Token Ring address space.
• Extension-folder drivers from NSI 1.4.5 are now supported
• Multiple clients may now bind to the same SAP/SNAP.
• Fixed a bug in the XID auto-response code. Also, attempting to send test or xid packets when autotest/xid is set now returns an error.
• Added a PCMCIA Bus type for OTPortRefs.
• Fixed a problem where packets were being delivered in backwards order.